<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>运动损伤康复管理系统 - 医生端</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background-color: #f5f7fa;
            color: #333;
        }

        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 1rem 2rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .header h1 {
            font-size: 1.8rem;
            margin-bottom: 0.5rem;
        }

        .header p {
            opacity: 0.9;
            font-size: 1rem;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 2rem;
        }

        .nav-tabs {
            display: flex;
            background: white;
            border-radius: 10px;
            margin-bottom: 2rem;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        .nav-tab {
            flex: 1;
            padding: 1rem 2rem;
            background: white;
            border: none;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 500;
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
        }

        .nav-tab:hover {
            background: #f8f9fa;
        }

        .nav-tab.active {
            background: #667eea;
            color: white;
            border-bottom-color: #4c63d2;
        }

        .tab-content {
            display: none;
        }

        .tab-content.active {
            display: block;
        }

        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin-bottom: 2rem;
        }

        .card {
            background: white;
            border-radius: 15px;
            padding: 2rem;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 30px rgba(0,0,0,0.15);
        }

        .card h3 {
            color: #667eea;
            margin-bottom: 1rem;
            font-size: 1.3rem;
        }

        .stat-card {
            text-align: center;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .stat-number {
            font-size: 3rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }

        .stat-label {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        .table-container {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        .table {
            width: 100%;
            border-collapse: collapse;
        }

        .table th {
            background: #667eea;
            color: white;
            padding: 1rem;
            text-align: left;
            font-weight: 500;
        }

        .table td {
            padding: 1rem;
            border-bottom: 1px solid #eee;
        }

        .table tr:hover {
            background: #f8f9fa;
        }

        .btn {
            padding: 0.5rem 1rem;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 500;
            transition: all 0.3s ease;
            margin: 0 0.25rem;
        }

        .btn-primary {
            background: #667eea;
            color: white;
        }

        .btn-primary:hover {
            background: #5a67d8;
        }

        .btn-success {
            background: #48bb78;
            color: white;
        }

        .btn-success:hover {
            background: #38a169;
        }

        .btn-warning {
            background: #ed8936;
            color: white;
        }

        .btn-warning:hover {
            background: #dd6b20;
        }

        .btn-danger {
            background: #f56565;
            color: white;
        }

        .btn-danger:hover {
            background: #e53e3e;
        }

        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }

        .status-active {
            background: #c6f6d5;
            color: #22543d;
        }

        .status-completed {
            background: #bee3f8;
            color: #2a4365;
        }

        .status-paused {
            background: #fed7d7;
            color: #742a2a;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
            color: #4a5568;
        }

        .form-input, .form-select, .form-textarea {
            width: 100%;
            padding: 0.75rem;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 1rem;
            transition: border-color 0.3s ease;
        }

        .form-input:focus, .form-select:focus, .form-textarea:focus {
            outline: none;
            border-color: #667eea;
        }

        .form-textarea {
            resize: vertical;
            min-height: 100px;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
        }

        .modal-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 15px;
            padding: 2rem;
            max-width: 600px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid #e2e8f0;
        }

        .modal-title {
            font-size: 1.5rem;
            color: #667eea;
            font-weight: 600;
        }

        .close-btn {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: #a0aec0;
        }

        .close-btn:hover {
            color: #667eea;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #e2e8f0;
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #48bb78, #38a169);
            transition: width 0.3s ease;
        }

        .chart-container {
            height: 300px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f8f9fa;
            border-radius: 10px;
            margin: 1rem 0;
        }

        .search-box {
            width: 100%;
            max-width: 400px;
            margin-bottom: 1rem;
        }

        .action-buttons {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        @media (max-width: 768px) {
            .container {
                padding: 1rem;
            }
            
            .nav-tabs {
                flex-direction: column;
            }
            
            .dashboard-grid {
                grid-template-columns: 1fr;
            }
            
            .action-buttons {
                flex-direction: column;
            }
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>运动损伤康复管理系统</h1>
        <p>医生工作台 - 专业的患者康复管理平台</p>
    </div>

    <div class="container">
        <div class="nav-tabs">
            <button class="nav-tab active" onclick="showTab('dashboard')">仪表板</button>
            <button class="nav-tab" onclick="showTab('patients')">患者管理</button>
            <button class="nav-tab" onclick="showTab('plans')">康复计划</button>
            <button class="nav-tab" onclick="showTab('library')">方案库管理</button>
            <button class="nav-tab" onclick="showTab('analytics')">数据分析</button>
        </div>

        <!-- 仪表板 -->
        <div id="dashboard" class="tab-content active">
            <div class="dashboard-grid">
                <div class="card stat-card">
                    <div class="stat-number">156</div>
                    <div class="stat-label">总患者数</div>
                </div>
                <div class="card stat-card">
                    <div class="stat-number">89</div>
                    <div class="stat-label">活跃康复计划</div>
                </div>
                <div class="card stat-card">
                    <div class="stat-number">67</div>
                    <div class="stat-label">本月完成计划</div>
                </div>
                <div class="card stat-card">
                    <div class="stat-number">92%</div>
                    <div class="stat-label">平均完成率</div>
                </div>
            </div>

            <div class="card">
                <h3>最近活动</h3>
                <div class="table-container">
                    <table class="table">
                        <thead>
                            <tr>
                                <th>时间</th>
                                <th>患者</th>
                                <th>活动</th>
                                <th>状态</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td>2024-01-30 14:30</td>
                                <td>张三</td>
                                <td>完成肩关节康复训练</td>
                                <td><span class="status-badge status-completed">已完成</span></td>
                            </tr>
                            <tr>
                                <td>2024-01-30 13:15</td>
                                <td>李四</td>
                                <td>开始膝关节康复计划</td>
                                <td><span class="status-badge status-active">进行中</span></td>
                            </tr>
                            <tr>
                                <td>2024-01-30 11:45</td>
                                <td>王五</td>
                                <td>暂停腰部康复训练</td>
                                <td><span class="status-badge status-paused">已暂停</span></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <!-- 患者管理 -->
        <div id="patients" class="tab-content">
            <div class="action-buttons">
                <input type="text" class="form-input search-box" placeholder="搜索患者姓名、ID或手机号...">
                <button class="btn btn-primary" onclick="showModal('addPatientModal')">添加新患者</button>
                <button class="btn btn-success" onclick="exportPatients()">导出数据</button>
            </div>

            <div class="table-container">
                <table class="table">
                    <thead>
                        <tr>
                            <th>患者ID</th>
                            <th>姓名</th>
                            <th>年龄</th>
                            <th>性别</th>
                            <th>联系方式</th>
                            <th>当前计划</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody id="patientsTable">
                        <tr>
                            <td>P001</td>
                            <td>张三</td>
                            <td>28</td>
                            <td>男</td>
                            <td>138****1234</td>
                            <td>肩关节康复计划</td>
                            <td><span class="status-badge status-active">治疗中</span></td>
                            <td>
                                <button class="btn btn-primary" onclick="viewPatient('P001')">查看</button>
                                <button class="btn btn-warning" onclick="editPatient('P001')">编辑</button>
                                <button class="btn btn-success" onclick="assignPlan('P001')">分配计划</button>
                            </td>
                        </tr>
                        <tr>
                            <td>P002</td>
                            <td>李四</td>
                            <td>35</td>
                            <td>女</td>
                            <td>139****5678</td>
                            <td>膝关节康复计划</td>
                            <td><span class="status-badge status-active">治疗中</span></td>
                            <td>
                                <button class="btn btn-primary" onclick="viewPatient('P002')">查看</button>
                                <button class="btn btn-warning" onclick="editPatient('P002')">编辑</button>
                                <button class="btn btn-success" onclick="assignPlan('P002')">分配计划</button>
                            </td>
                        </tr>
                        <tr>
                            <td>P003</td>
                            <td>王五</td>
                            <td>42</td>
                            <td>男</td>
                            <td>137****9012</td>
                            <td>腰部康复计划</td>
                            <td><span class="status-badge status-paused">暂停</span></td>
                            <td>
                                <button class="btn btn-primary" onclick="viewPatient('P003')">查看</button>
                                <button class="btn btn-warning" onclick="editPatient('P003')">编辑</button>
                                <button class="btn btn-success" onclick="assignPlan('P003')">分配计划</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <!-- 康复计划管理 -->
        <div id="plans" class="tab-content">
            <div class="action-buttons">
                <input type="text" class="form-input search-box" placeholder="搜索计划名称或患者...">
                <button class="btn btn-primary" onclick="showModal('createPlanModal')">创建新计划</button>
                <select class="form-select" style="max-width: 200px;">
                    <option>全部状态</option>
                    <option>进行中</option>
                    <option>已完成</option>
                    <option>已暂停</option>
                </select>
            </div>

            <div class="table-container">
                <table class="table">
                    <thead>
                        <tr>
                            <th>计划ID</th>
                            <th>患者</th>
                            <th>计划名称</th>
                            <th>部位</th>
                            <th>开始日期</th>
                            <th>预计结束</th>
                            <th>进度</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>R001</td>
                            <td>张三</td>
                            <td>肩关节康复计划</td>
                            <td>肩部</td>
                            <td>2024-01-15</td>
                            <td>2024-02-15</td>
                            <td>
                                <div class="progress-bar">
                                    <div class="progress-fill" style="width: 65%"></div>
                                </div>
                                65%
                            </td>
                            <td><span class="status-badge status-active">进行中</span></td>
                            <td>
                                <button class="btn btn-primary" onclick="viewPlan('R001')">查看</button>
                                <button class="btn btn-warning" onclick="editPlan('R001')">编辑</button>
                                <button class="btn btn-danger" onclick="pausePlan('R001')">暂停</button>
                            </td>
                        </tr>
                        <tr>
                            <td>R002</td>
                            <td>李四</td>
                            <td>膝关节康复计划</td>
                            <td>膝部</td>
                            <td>2024-01-20</td>
                            <td>2024-02-10</td>
                            <td>
                                <div class="progress-bar">
                                    <div class="progress-fill" style="width: 80%"></div>
                                </div>
                                80%
                            </td>
                            <td><span class="status-badge status-active">进行中</span></td>
                            <td>
                                <button class="btn btn-primary" onclick="viewPlan('R002')">查看</button>
                                <button class="btn btn-warning" onclick="editPlan('R002')">编辑</button>
                                <button class="btn btn-danger" onclick="pausePlan('R002')">暂停</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>

        <!-- 方案库管理 -->
        <div id="library" class="tab-content">
            <div class="action-buttons">
                <input type="text" class="form-input search-box" placeholder="搜索康复方案...">
                <button class="btn btn-primary" onclick="showModal('addTemplateModal')">添加新模板</button>
                <select class="form-select" style="max-width: 200px;">
                    <option>全部部位</option>
                    <option>肩部</option>
                    <option>膝部</option>
                    <option>腰部</option>
                    <option>踝部</option>
                </select>
            </div>

            <div class="dashboard-grid">
                <div class="card">
                    <h3>肩关节康复方案</h3>
                    <p><strong>适用部位：</strong>肩部</p>
                    <p><strong>损伤类型：</strong>拉伤、扭伤</p>
                    <p><strong>严重程度：</strong>轻度-中度</p>
                    <p><strong>训练周期：</strong>4-6周</p>
                    <div style="margin-top: 1rem;">
                        <button class="btn btn-primary">查看详情</button>
                        <button class="btn btn-warning">编辑</button>
                        <button class="btn btn-success">应用到患者</button>
                    </div>
                </div>

                <div class="card">
                    <h3>膝关节康复方案</h3>
                    <p><strong>适用部位：</strong>膝部</p>
                    <p><strong>损伤类型：</strong>扭伤、韧带损伤</p>
                    <p><strong>严重程度：</strong>轻度-重度</p>
                    <p><strong>训练周期：</strong>6-8周</p>
                    <div style="margin-top: 1rem;">
                        <button class="btn btn-primary">查看详情</button>
                        <button class="btn btn-warning">编辑</button>
                        <button class="btn btn-success">应用到患者</button>
                    </div>
                </div>

                <div class="card">
                    <h3>腰部康复方案</h3>
                    <p><strong>适用部位：</strong>腰部</p>
                    <p><strong>损伤类型：</strong>拉伤、椎间盘问题</p>
                    <p><strong>严重程度：</strong>中度-重度</p>
                    <p><strong>训练周期：</strong>8-12周</p>
                    <div style="margin-top: 1rem;">
                        <button class="btn btn-primary">查看详情</button>
                        <button class="btn btn-warning">编辑</button>
                        <button class="btn btn-success">应用到患者</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- 数据分析 -->
        <div id="analytics" class="tab-content">
            <div class="dashboard-grid">
                <div class="card">
                    <h3>康复成功率统计</h3>
                    <div class="chart-container">
                        <p>图表区域 - 康复成功率趋势图</p>
                    </div>
                </div>

                <div class="card">
                    <h3>损伤类型分布</h3>
                    <div class="chart-container">
                        <p>图表区域 - 损伤类型饼图</p>
                    </div>
                </div>

                <div class="card">
                    <h3>月度康复完成情况</h3>
                    <div class="chart-container">
                        <p>图表区域 - 月度完成率柱状图</p>
                    </div>
                </div>

                <div class="card">
                    <h3>患者年龄分布</h3>
                    <div class="chart-container">
                        <p>图表区域 - 年龄分布直方图</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 添加患者模态框 -->
    <div id="addPatientModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h2 class="modal-title">添加新患者</h2>
                <button class="close-btn" onclick="hideModal('addPatientModal')">&times;</button>
            </div>
            <form>
                <div class="form-group">
                    <label class="form-label">患者姓名</label>
                    <input type="text" class="form-input" placeholder="请输入患者姓名">
                </div>
                <div class="form-group">
                    <label class="form-label">年龄</label>
                    <input type="number" class="form-input" placeholder="请输入年龄">
                </div>
                <div class="form-group">
                    <label class="form-label">性别</label>
                    <select class="form-select">
                        <option>请选择性别</option>
                        <option>男</option>
                        <option>女</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">联系电话</label>
                    <input type="tel" class="form-input" placeholder="请输入联系电话">
                </div>
                <div class="form-group">
                    <label class="form-label">损伤部位</label>
                    <select class="form-select">
                        <option>请选择损伤部位</option>
                        <option>头部</option>
                        <option>颈部</option>
                        <option>肩部</option>
                        <option>手臂</option>
                        <option>手腕</option>
                        <option>胸部</option>
                        <option>背部</option>
                        <option>腰部</option>
                        <option>臀部</option>
                        <option>大腿</option>
                        <option>膝盖</option>
                        <option>小腿</option>
                        <option>脚踝</option>
                        <option>脚部</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">损伤类型</label>
                    <select class="form-select">
                        <option>请选择损伤类型</option>
                        <option>扭伤</option>
                        <option>拉伤</option>
                        <option>挫伤</option>
                        <option>骨折</option>
                        <option>脱臼</option>
                        <option>韧带损伤</option>
                        <option>肌肉撕裂</option>
                        <option>其他</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">病情描述</label>
                    <textarea class="form-textarea" placeholder="请详细描述患者的病情和症状"></textarea>
                </div>
                <div style="text-align: right; margin-top: 2rem;">
                    <button type="button" class="btn btn-primary" onclick="addPatient()">添加患者</button>
                    <button type="button" class="btn" onclick="hideModal('addPatientModal')" style="background: #e2e8f0; color: #4a5568; margin-left: 1rem;">取消</button>
                </div>
            </form>
        </div>
    </div>

    <!-- 创建康复计划模态框 -->
    <div id="createPlanModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h2 class="modal-title">创建康复计划</h2>
                <button class="close-btn" onclick="hideModal('createPlanModal')">&times;</button>
            </div>
            <form>
                <div class="form-group">
                    <label class="form-label">选择患者</label>
                    <select class="form-select">
                        <option>请选择患者</option>
                        <option>张三 (P001)</option>
                        <option>李四 (P002)</option>
                        <option>王五 (P003)</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">计划名称</label>
                    <input type="text" class="form-input" placeholder="请输入康复计划名称">
                </div>
                <div class="form-group">
                    <label class="form-label">康复方案模板</label>
                    <select class="form-select">
                        <option>请选择康复方案</option>
                        <option>肩关节康复方案</option>
                        <option>膝关节康复方案</option>
                        <option>腰部康复方案</option>
                        <option>自定义方案</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">计划开始日期</label>
                    <input type="date" class="form-input">
                </div>
                <div class="form-group">
                    <label class="form-label">预计结束日期</label>
                    <input type="date" class="form-input">
                </div>
                <div class="form-group">
                    <label class="form-label">训练强度</label>
                    <select class="form-select">
                        <option>低强度</option>
                        <option>中强度</option>
                        <option>高强度</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">特殊说明</label>
                    <textarea class="form-textarea" placeholder="请输入特殊注意事项或个性化调整"></textarea>
                </div>
                <div style="text-align: right; margin-top: 2rem;">
                    <button type="button" class="btn btn-primary" onclick="createPlan()">创建计划</button>
                    <button type="button" class="btn" onclick="hideModal('createPlanModal')" style="background: #e2e8f0; color: #4a5568; margin-left: 1rem;">取消</button>
                </div>
            </form>
        </div>
    </div>

    <!-- 添加康复方案模板模态框 -->
    <div id="addTemplateModal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h2 class="modal-title">添加康复方案模板</h2>
                <button class="close-btn" onclick="hideModal('addTemplateModal')">&times;</button>
            </div>
            <form>
                <div class="form-group">
                    <label class="form-label">方案名称</label>
                    <input type="text" class="form-input" placeholder="请输入康复方案名称">
                </div>
                <div class="form-group">
                    <label class="form-label">适用部位</label>
                    <select class="form-select">
                        <option>请选择适用部位</option>
                        <option>肩部</option>
                        <option>膝部</option>
                        <option>腰部</option>
                        <option>踝部</option>
                        <option>其他</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">损伤类型</label>
                    <select class="form-select">
                        <option>请选择损伤类型</option>
                        <option>扭伤</option>
                        <option>拉伤</option>
                        <option>韧带损伤</option>
                        <option>骨折</option>
                        <option>其他</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">严重程度</label>
                    <select class="form-select">
                        <option>轻度</option>
                        <option>中度</option>
                        <option>重度</option>
                    </select>
                </div>
                <div class="form-group">
                    <label class="form-label">训练周期（周）</label>
                    <input type="number" class="form-input" placeholder="请输入训练周期">
                </div>
                <div class="form-group">
                    <label class="form-label">方案描述</label>
                    <textarea class="form-textarea" placeholder="请详细描述康复方案的内容和目标"></textarea>
                </div>
                <div style="text-align: right; margin-top: 2rem;">
                    <button type="button" class="btn btn-primary" onclick="addTemplate()">添加模板</button>
                    <button type="button" class="btn" onclick="hideModal('addTemplateModal')" style="background: #e2e8f0; color: #4a5568; margin-left: 1rem;">取消</button>
                </div>
            </form>
        </div>
    </div>

    <script>
        // 标签页切换
        function showTab(tabName) {
            // 隐藏所有标签页内容
            const tabContents = document.querySelectorAll('.tab-content');
            tabContents.forEach(content => content.classList.remove('active'));
            
            // 移除所有标签页按钮的活跃状态
            const tabButtons = document.querySelectorAll('.nav-tab');
            tabButtons.forEach(button => button.classList.remove('active'));
            
            // 显示选中的标签页内容
            document.getElementById(tabName).classList.add('active');
            
            // 激活选中的标签页按钮
            event.target.classList.add('active');
        }

        // 模态框显示
        function showModal(modalId) {
            document.getElementById(modalId).style.display = 'block';
        }

        // 模态框隐藏
        function hideModal(modalId) {
            document.getElementById(modalId).style.display = 'none';
        }

        // 点击模态框外部关闭
        window.onclick = function(event) {
            if (event.target.classList.contains('modal')) {
                event.target.style.display = 'none';
            }
        }

        // 患者管理功能
        function viewPatient(patientId) {
            alert('查看患者详情: ' + patientId);
        }

        function editPatient(patientId) {
            alert('编辑患者信息: ' + patientId);
        }

        function assignPlan(patientId) {
            showModal('createPlanModal');
        }

        function addPatient() {
            alert('添加患者成功！');
            hideModal('addPatientModal');
        }

        function exportPatients() {
            alert('导出患者数据...');
        }

        // 康复计划管理功能
        function viewPlan(planId) {
            alert('查看康复计划详情: ' + planId);
        }

        function editPlan(planId) {
            alert('编辑康复计划: ' + planId);
        }

        function pausePlan(planId) {
            if (confirm('确定要暂停这个康复计划吗？')) {
                alert('康复计划已暂停: ' + planId);
            }
        }

        function createPlan() {
            alert('康复计划创建成功！');
            hideModal('createPlanModal');
        }

        // 方案库管理功能
        function addTemplate() {
            alert('康复方案模板添加成功！');
            hideModal('addTemplateModal');
        }

        // 初始化页面
        document.addEventListener('DOMContentLoaded', function() {
            console.log('医生端管理系统已加载');
        });
    </script>
</body>
</html>